import request from '@/utils/request'
import { get, post, upload, dele } from '@/utils/request'
export function login(data) {
  return request({
    url: '/sysUser/login.json',
    method: 'post',
    data
  })
}
export function getInfo() {
  return request({
    url: '/sysUser/menuItems.json',
    method: 'get'
  })
}

// 修改密码
export function changePwd(data) {
  return request({
    url: '/sysUser/modifyHtPass.json',
    method: 'post',
    data: data
  })
}
// 退出登录
export function logout() {
  return request({
    url: '/sysUser/logout.json',
    method: 'post'
  })
}
// 上传图片
export function upLoadimg(params) {
  return upload('/sysUser/upImgs.json',
    params)
}
// 新增修改用户
export function addUser(params) {
  return post('/customer/addOrUpdate',
    params)
}
// 获取客户列表
export function getUser(params) {
  return get('/customerList',
    params)
}
// 删除用户
export function deleteUser(params) {
  return dele('/customer/delete',
    params)
}

// 充值金额
export function Recharge(params) {
  return post('/recharge',
    params)
}

// 充值记录
export function rechargeList(params) {
  return get('/rechargeList',
    params)
}
// 删除充值记录
export function deleteRecharge(params) {
  return dele('/recharge/delete',
    params)
}
// 用户统计记录
export function orderStatistics(params) {
  return get('/orderStatistics',
    params)
}
// 我的订单
export function orderList(params) {
  return get('/orderList',
    params)
}
// 删除订单
export function deleteOrder(params) {
  return dele('/order',
    params)
}
// 新增编辑订单
export function addOrUpdate(params) {
  return post('/order/addOrUpdate',
    params)
}
// 获取支付设置
export function payList(params) {
  return get('/payList',
    params)
}
// 修改支付设置
export function paySet(params) {
  return post('/pay/addOrUpdate',
    params)
}
// 币种下拉选
export function nopage() {
  return get('/nopage')
}

// 用户详情
export function userInfo() {
  return request({
    url: '/sysUser/userInfo.json',
    method: 'get'
  })
}
// 获取县域地址
export function getAddress() {
  return request({
    url: '/ht/areaList.json',
    method: 'get'
  })
}
